<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ include file="../../base.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            财务报运
            <small>修改财务报运单</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="all-admin-index.html"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="all-order-manage-list.html">财务报运</a></li>
            <li class="active">新增财务报运单</li>
        </ol>
    </section>
    <!-- 内容头部 /-->
    <form id="editForm" action="${ctx}/cargo/export/edit.do" method="post">
        <input type="hidden" name="contractIds" value="${invoice.invoiceId}" >
        <input type="hidden" name="id" value="${financial.id}" >
        <!-- 正文区域 -->
        <section class="content">
            <div class="panel panel-default">
                <div class="panel-heading">新增财务报运单</div>

                <div class="row data-type" style="margin: 0px">
                    <%-- <div class="col-md-2 title">制单日期</div>
                     <div class="col-md-4 data">
                         <input type="text" class="form-control" placeholder="制单日期" name="lcno" value="${financial.inputDate}"/>
                     </div>--%>
                    <div class="col-md-2 title">制单日期</div>
                    <div class="col-md-4 data">
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" placeholder="签单日期"  name="signingDate" class="form-control pull-right"
                                   value="<fmt:formatDate value="${contract.signingDate}" pattern="yyyy-MM-dd"/>" id="signingDate">
                        </div>
                    </div>
                    <div class="col-md-2 title">制单人</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="制单人" name="consignee" value="${financial.documentMaker}"/>
                    </div>

                </div>

            </div>


            <!-- .box-body -->
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">发票列表</h3>
                </div>

                <div class="box-body">

                    <!-- 数据表格 -->
                    <div class="table-box">
                        <!--数据列表-->
                        <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                            <thead>
                            <tr>
                                <td class="tableHeader"><input type="checkbox" name="selid" onclick="checkAll('id',this)"></td>
                                <td class="tableHeader">序号</td>
                                <td class="tableHeader">SC_NO</td>
                                <td class="tableHeader">BL_NO</td>
                                <td class="tableHeader">贸易条款</td>
                                <td class="tableHeader">发票日期</td>
                            </tr>
                            </thead>
                            <tbody class="tableBody" >
                            ${links }
                            <c:forEach items="${page.list}" var="o" varStatus="status">
                                <tr class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'" >
                                    <td><input type="checkbox" name="id" value="${o.id}"/></td>
                                    <td>${status.index+1}</td>
                                    <td>${o.scNo}</td>
                                    <td>${o.blNo}</td>
                                    <td>${o.tradeTerms}</td>
                                    <td>${o.createTime}</td>
                                        <%-- <td>
                                             <a href="${ctx}/cargo/contractProduct/toUpdate.do?id=${o.id}">[修改]</a>
                                             <a href="${ctx}/cargo/contractProduct/delete.do?id=${o.id}&contractId=${o.contractId}">[删除]</a>
                                             <a href="${ctx}/cargo/extCproduct/list.do?contractId=${o.contractId}&contractProductId=${o.id}">[附件]</a>
                                         </td>--%>
                                </tr>

                                <%--<c:forEach items="${o.extCproducts}" var="ext" varStatus="status">
                                    <tr height="40" class="odd" onmouseover="this.className='highlight'" onmouseout="this.className='odd'" >
                                        <td>&nbsp;</td>
                                        <td align="right"><font color="blue">附件：${status.index+1}&nbsp;</font></td>
                                        <td>${ext.factoryName}</td>
                                        <td>${ext.productNo}</td>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td>${ext.packingUnit}</td>
                                        <td>${ext.cnumber}</td>
                                        <td>${ext.price}</td>
                                        <td>${ext.amount}</td>
                                    </tr>
                                </c:forEach>--%>
                            </c:forEach>
                            </tbody>
                        </table>
                        <!--数据列表/-->
                        <!--工具栏/-->
                    </div>
                    <!-- 数据表格 /-->
                </div>
                <!-- /.box-body -->

            </div>

            <!--工具栏-->
            <div class="box-tools text-center">
                <button type="submit"  class="btn bg-maroon">保存</button>
                <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
            </div>
            <!--工具栏/-->
        </section>
    </form>
</div>
<!-- 内容区域 /-->
</body>

<script>
    $('#signingDate').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
</script>

</html>